AUM_MAPPER = {
    0: 1,
    5: 2,
    10: 3,
    20: 4,
    50: 5,
    100: 6,
}

PPW_AUM_MAP={
    1:"0-5亿",
    2:"5-10亿",
    3:"10-20亿",
    4:"20-50亿",
    5:"50-100亿",
    6:"100亿以上",
}

PPW_STATUS_MAP = {
    1: "募集中",
    2: "运行中",
    4: "提前清算",
    5: "到期清算",
    6: "发行失败",
    7: "投顾协议已终止",
    8: "延期清算",
    9: "非正常清算",
    10: "已终止",
    11: "已作废",
    -1: "其他",
}
STATUS_PPW_MAP = {v: k for k, v in PPW_STATUS_MAP.items()}

PPW_STRATEGY_MAP = {
    1001: "股票策略",
    1002: "债券策略",
    1003: "期货及衍生品策略",
    1004: "多资产策略",
    1005: "组合基金",
    -1: "其它策略",
}

STRATEGY_PPW_MAP = {v: k for k, v in PPW_STRATEGY_MAP.items()}

PPW_SECOND_STRATEGY_MAP = {
    100101: "主观多头",
    100102: "量化多头",
    100103: "股票多空",
    100104: "股票市场中性",
    100201: "纯债策略",
    100202: "债券增强",
    100203: "债券复合策略",
    100204: "转债交易策略",
    100301: "主观CTA",
    100302: "量化CTA",
    100303: "期权策略",
    100304: "其他衍生品策略",
    100401: "宏观策略",
    100402: "套利策略",
    100403: "复合策略",
    100501: "FOF",
    100502: "MOM",
    -1: "其它",
}

SECOND_STRATEGY_PPW_MAP = {v: k for k, v in PPW_SECOND_STRATEGY_MAP.items()}

PPW_THIRD_STRATEGY_MAP = {
    10010101: "主观选股",
    10010102: "定增打新",
    10010201: "沪深300指增",
    10010202: "中证500指增",
    10010203: "中证1000指增",
    10010204: "其他指增",
    10010205: "量化选股",
    10030101: "主观趋势",
    10030102: "主观套利",
    10030103: "主观多策略",
    10030201: "量化趋势",
    10030202: "量化套利",
    10030203: "量化多策略",
    -1: "其它",
}

THIRD_STRATEGY_PPW_MAP = {v: k for k, v in PPW_THIRD_STRATEGY_MAP.items()}

PPW_FUNDTYPE_MAP = {
    1: "信托计划",
    2: "有限合伙",
    3: "券商资管",
    4: "公募专户",
    5: "单账户",
    6: "私募证券",
    7: "海外基金",
    8: "期货资管",
    9: "保险资管",
    10: "创业投资基金",
    11: "股权投资基金",
    12: "银行理财",
    13: "类固收信托 ",
    14: "私募资产配置基金",
    -1: "其他投资基金",
}
FUNDTYPE_PPW_MAP = {v: k for k, v in PPW_FUNDTYPE_MAP.items()}

PPW_COMPANYTYPE_MAP = {
    1: "私募证券投资",
    2: "公募基金公司",
    3: "银行",
    4: "证券公司",
    5: "信托公司",
    6: "审计机构",
    7: "法律顾问",
    8: "投资顾问",
    9: "行政管理人(废弃)",
    10: "上市公司(废弃)",
    11: "期货公司",
    12: "基金公司子公司",
    13: "工作室",
    14: "私募股权投资(废弃)",
    15: "证券公司子公司",
    16: "期货公司子公司",
    17: "私募股权、创业投资",
    18: "私募其他投资",
    19: "保险公司",
    20: "保险公司子公司",
    21: "私募资产配置类管理人",
    22: "证券公司私募基金子公司",
    23: "独立第三方销售机构",
    24: "支付结算机构",
    25: "独立服务机构",
    26: "地方自律组织",
    -1: "其他"
}

COMPANYTYPE_PPW_MAP = {v: k for k, v in PPW_COMPANYTYPE_MAP.items()}

COMPANYINFO_COL = {
    "p_company_id": "上级公司ID",
    "company_id": "公司ID",
    "company_name": "公司中文全称",
    "company_short_name": "公司中文简称",
    "company_type": "公司类型",
    "organization_number": "组织机构代码",
    "establish_date": "公司成立日期",
    "domicile_id": "公司注册地区",
    "company_address": "公司注册地址",
    "company_address2": "办公地址",
    "city": "城市",
    "province": "省",
    "country": "国家",
    "reg_city": "注册城市",
    "reg_province": "注册省",
    "reg_country": "注册国家",
    "post_code": "邮政编码",
    "website": "公司网址",
    "registered_capital": "公司注册资本",
    "company_profile": "公司简介",
    "offshore_fund": "是否有海外基金",
    "philosopy": "投资理念",
    "company_status": "公司工商状态",
    "base_currency_crc": "公司注册资本货币单位",
    "register_number": "备案编码",
    "register_status": "公司监管机构备案状态",
    "register_date": "备案日期",
    "is_member": "是否会员",
    "join_date": "入会时间",
    "member_type": "会员类型",
    "fund_category_ori": "管理基金主要类别",
    "business_type": "业务类型",
    "nature_business_type": "企业性质",
    "capital_paid_rate": "注册资本实缴比例",
    "isvalid": "记录的有效性",
    "updatetime": "修改时间",
    "paid_capital": "实缴资本(万元）",
    "company_asset_size": "公司资产规模",
    "managed_fund_count": "在管基金数量(监管公示)",
    "employee_cnts": "员工人数",
    "fund_practitioners_count": "取得基金从业人数",
    "integrity_info": "诚信信息",
    "special_tips": "特别提示信息",
    "createtime": "创建时间",
    "credit_code": "统一社会信用代码",
    "has_consulting_qualification": "是否有3+3投顾资质",
    "cancel_type": "注销类型",
    "cancel_date": "备案注销日期",
}
FUNDINFO_COL = {
    "id": "主键ID",
    "p_fund_id": "父级产品ID",
    "fund_id": "基金ID",
    "fund_name": "基金中文全称",
    "fund_short_name": "基金中文简称",
    "fund_structure": "基金形式",
    "fund_type": "基金类型",
    "raise_type": "募集方式",
    "manager_type": "管理类型",
    "fund_characteristic": "券商资管产品特点",
    "base_currency": "基础货币",
    "inception_date": "成立日期",
    "domicile": "注册国家",
    "primary_benchmark_id": "指数ID",
    "secondary_benchmark": "业绩基准指数及其说明",
    "lockup_period": "封闭期",
    "open_day": "开放日",
    "redemption_day": "赎回日",
    "duration": "产品存续期",
    "initial_unit_value": "单位面值",
    "investment_scope": "基金投资范围",
    "investment_objective": "投资目标",
    "fund_portfolio": "基金资产配置比例",
    "investment_restriction": "投资限制",
    "fund_investment_philosophy": "投资理念",
    "fund_strategy_description": "投资策略",
    "advisor_id": "投资顾问ID",
    "issuer_id": "发行人ID",
    "custodian_id": "托管机构ID",
    "broker_id": "证券经纪人ID",
    "broker_future_id": "期货经纪人ID",
    "liquidation_agency_id": "外包机构ID",
    "trust_id": "基金管理公司ID",
    "administrator_id": "行政管理人ID",
    "legal_counsel_id": "法律顾问ID",
    "auditor_id": "审计机构",
    "nav_frequency": "净值披露频率",
    "performance_disclosure_mark": "产品业绩披露标识",
    "performance_disclosure_type": "产品业绩披露方式",
    "isvalid": "记录的有效性",
    "register_number": "备案编码",
    "register_date": "备案日期",
    "special_tips": "基金协会特别提示",
    "special_tips_scale": "基金协会特别提示（存续规模是否低于500w）",
    "istiered": "是否分级",
    "lockup_period_unit": "封闭期单位",
    "lock_period": "锁定期",
    "lock_period_unit": "锁定期单位",
    "trust_register_number": "中信登备案编码",
    "is_deduct_reward": "是否扣除业绩报酬",
    "is_fee_before": "是否费前",
    "createtime": "创建时间",
    "updatetime": "修改时间",
}
FUNDSTATUS_COL = {
    "id": "主键ID",
    "fund_id": "基金ID",
    "fund_status": "基金运行状态",
    "status_start_date": "募集开始时间",
    "status_end_date": "募集结束时间",
    "liquidate_date": "清算日期",
    "performance_start_date": "开始运作日期",
    "fund_status_note": "基金运行状态说明",
    "isvalid": "记录的有效性",
    "updatetime": "修改时间",
    "createtime": "创建时间",
}
FUNDSTRATEGY_COL = {
    "fund_id": "基金id",
    "strategy": "融智策略分类",
    "substrategy": "融智子策略分类",
    "first_strategy": "排排网一级策略",
    "second_strategy": "排排网二级策略",
    "third_strategy": "排排网三级策略",
    "source_type": "策略来源",
    "isvalid": "记录的有效性",
    "updatetime": "修改时间",
    "createtime": "创建时间",
}
NAV_COL = {
    "id": "主键ID",
    "fund_id": "基金ID",
    "price_date": "净值日期",
    "nav": "单位净值",
    "cumulative_nav": "考虑分红再投资的单位累计净值",
    "cumulative_nav_withdrawal": "分红不投资的单位累计净值",
    "ishigh_or_low": "净值创新高或新低标志",
    "tohigh_nav_ratio": "距离历史新高的距离",
    "isvalid": "记录的有效性",
    "updatetime": "修改时间",
    "createtime": "创建时间",
    "nav_source": "净值来源",
}
FUNDMANAGERMAP_COL = {
    "id": "主键ID",
    "fund_id": "基金ID",
    "fund_manager_id": "基金经理ID",
    "management_start_date": "基金管理开始时间",
    "management_end_date": "基金管理结束时间",
    "updatetime": "修改时间",
    "isvalid": "是否有效",
    "createtime": "创建时间",
}
MANAGERINFO_COL = {
    "personnel_id": "人员ID",
    "personnel_name": "姓名",
    "profession_background": "职业背景",
    "career_start_year": "从业开始年份",
    "investment_experience": "从业年限",
    "sex": "性别",
    "education": "最高学历",
    "profile": "人物简介",
    "isvalid": "记录的有效性",
    "get_qualify_method": "资格获取方式",
    "is_qualify": "是否有从业资格",
    "topic": "荣誉名称",
    "createtime": "创建时间",
    "updatetime": "更新时间",
}
